import request from '@/utils/request';

// 分页查询
export function page(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/page',
		method: 'post',
		data: data,
	});
}

// 新增
export function save(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/save',
		method: 'post',
		data: data,
	});
}

// 修改
export function updateById(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/updateById',
		method: 'put',
		data: data,
	});
}

// 删除
export function removeByIds(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/removeByIds/' + data,
		method: 'delete',
	});
}
// 主量纲
export function dimensionOption(): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/dimensionOption',
		method: 'get',
	});
}

// 副量纲
export function subDimensionOption(): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/subDimensionOption',
		method: 'get',
	});
}

// 修改指标
export function updateDimensionById(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/mp/service/updateDimensionById',
		method: 'put',
		data,
	});
}
